#!/bin/bash

# 检查IPv4可疑数据包记录是否已启用
if [[ $(sysctl -n net.ipv4.conf.all.log_martians 2>/dev/null) -eq 1 ]]; then
    echo "通过：IPv4 all log_martians 已启用"
else
    echo "失败：IPv4 all log_martians 未启用"
    exit 1
fi

if [[ $(sysctl -n net.ipv4.conf.default.log_martians 2>/dev/null) -eq 1 ]]; then
    echo "通过：IPv4 default log_martians 已启用"
else
    echo "失败：IPv4 default log_martians 未启用"
    exit 1
fi